home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Util / Ah-Az / Antifreeze.sit / Antifreeze / Antifreeze.src < prev   
Encoding:
Text File  |  1986-10-11  |  1.2 KB  |  36 lines  |  [TEXT/MSWD]

  1. {This is an FKey that resets the SCC in order to "unfreeze" the mouse after an                    }
  2. {errant program has trodden upon it.  To install it from LightSpeed Pascal "Build and Save as..."}
  3. {a code resource with the type 'FKEY' and the single digit number of your choice.  Using ResEdit }
  4. {or an FKey installing program, move the FKEY into your system folder or an application.         }
  5. { Use this FKey when a program crash has frozen your mouse, and only as a last resort!             }
  6. {Hit cloverleaf - shift numeral, and everything should settle down to normal.                         }
  7. {Warning:  a side effect of this FKEY is to close the printer and modem ports, which may make    }
  8. {it impossible to return to your program if peripherals were in use prior to the crash.            }
  9.  
  10. {This code copyright (c) 1986, Lincoln D. Stein, but free for all non-commercial use.                }
  11.  
  12. UNIT antifreeze;
  13.  
  14. INTERFACE
  15.     PROCEDURE main;
  16.  
  17. IMPLEMENTATION
  18.  
  19.     FUNCTION Reset (refnum : integer) : OsErr;
  20.     BEGIN
  21.         IF NoErr <> SerReset(RefNum, baud9600 + stop20 + data8 + noParity) THEN
  22.             sysbeep(5);
  23.         Reset := CloseDriver(RefNum);
  24.     END;
  25.  
  26.     PROCEDURE main;
  27.         VAR
  28.             Out : Integer;
  29.             Err : OsErr;
  30.     BEGIN
  31.         Err := OpenDriver('.BOut', Out);
  32.         Err := Reset(Out);
  33.         Err := OpenDriver('.AOut', Out);
  34.         Err := Reset(Out);
  35.     END;
  36. END.